function pie(element_id, title_str, datas, colors){
    // element_id
    // data = [{value:734, name:'未开始'},{}] 
    // colorList = ['lawngreen', 'red']
    var el = document.getElementById(element_id);
    el.style.display = "flex";
    var myChart3 =echarts.init(el);
    var option3 = {
        grid: {
            // left: '3%',
            // right: '3%',
            // top: '3%',
            // bottom:"3%",
            width: '90%',
            height: '90%',
            containLabel: true,
        },
        // title: {
        //     text: title_str,
        //     textStyle:{ //设置主标题风格
        //         color:'#90939a',//设置主标题字体颜色
        //         fontSize:20,
        //     },
        //     left: "42%",
        // },
        // backgroundColor: 'rgb(45,48,53)',
        tooltip: {
            trigger: 'item',
            formatter: " {b}:{d}%"
        },
        legend: {
            orient: 'vertical',
            right: 20,
            y:'center',
            textStyle: {
                color: '#7c8081'
            },
            itemWidth: 10,          
            itemHeight: 10,          
            formatter: function (params) {
                console.log("----: " + option3.series[0].data);
               for (var i = 0; i < option3.series[0].data.length; i++) {
                   if (option3.series[0].data[i].name == params) {
                       return params +": "+ option3.series[0].data[i].value;
                   }
               }
            }
            
        },
        series: [
            {
                name: title_str,
                type:'pie',
                radius: ['50%', '70%'],
                avoidLabelOverlap: false,
                label: {
                    normal: {
                        show: false,
                        position: 'center'
                    },
                    emphasis: {
                        show: true,
                        textStyle: {
                            fontSize: '20',
                            fontWeight: 'bold'
                        }
                    }
                },
                 
                labelLine: {
                    normal: {
                        show: false
                    }
                },
                // 数据
                data: datas,

                itemStyle: {
                    emphasis: {
                        shadowBlur: 10,
                        shadowOffsetX: 0,
                        shadowColor: 'rgba(0, 0, 0, 0.5)'
                     },
                    normal:{
                        color:function(params) {
                            //自定义颜色
                            var colorList = colors;
                            return colorList[params.dataIndex]
                         }
                    }
              }
            }
        ]
    };
        
    var setoption=function(){
        myChart3.setOption(option3);//订单执行情况
    }
     setoption()
    $(window).resize(function(){
        myChart3.resize(); 
    })
    $(".abort_list").niceScroll({
        cursorcolor: "rgba(255,255,255,0.2)", //#CC0071 光标颜色
        cursoropacitymax: 1, //改变不透明度非常光标处于活动状态（scrollabar“可见”状态），范围从1到0
        touchbehavior: false, //使光标拖动滚动像在台式电脑触摸设备
        cursorwidth: "6px", //像素光标的宽度
        cursorborder: "0", // 游标边框css定义
        cursorborderradius: "5px", //以像素为光标边界半径
        autohidemode:true //是否隐藏滚动条
    })
}